package com.searchengine.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.searchengine.dao.ArticleDao;
import com.searchengine.entity.ContentObject;
import com.searchengine.service.ContentService;
@Service("contentService")
public class ContentServiceImpl implements ContentService {

	 @Autowired
	 private ArticleDao articleDao;

	public void setArticleDao(ArticleDao articleDao) {
		this.articleDao = articleDao;
	}

	public List<ContentObject> getContentList() throws Exception {
		return articleDao.getContentList();
	}

	public void saveArticle(ContentObject article) throws Exception {
		if(article!=null)
		articleDao.insertArticle(article);
	}
	 
	 
}
